using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UpgradeQuickBurst:Upgrade {

	bool doWork;

	protected override void BurstDecidingEventHandler(object _sender,BurstDecidingEventArgs e) {
		base.BurstDecidingEventHandler(_sender,e);
		if(weaponWeapon.fireMode==FireMode.Automatic&&weaponWeapon.state.timeAfterBurst>weaponWeapon.currentBurst.cooldownTime+0.5f) {
			e.stat.cooldownTime.AddMultiply(0.01f,2);
		}
		doWork=true;

	}

	protected override void ShootingEventHandler(object _sender,ShootEventArgs e) {
		base.ShootingEventHandler(_sender,e);
		if(doWork) {
			doWork=false;
			e.stat.cooldownTime.AddMultiply(0.01f,2);
		}
	}

}
